<?php
namespace app\api\validate;

use think\Validate;

class TaskService extends Validate
{

    /**
     * 验证规则
     */
    protected $rule = [
        'id'                            => 'require',
        'content'                       => 'require',
        'art_id'                        => 'require',
        'images'                        => 'array',
    ];

    /**
     * 提示消息
     */
    protected $message = [
        'id.require'                        => '任务id不能为空',
        'content.require'                   => '维修内容不能为空',
        'art_id.require'                    => '配件工艺不能为空',
        'images.array'                      => '图片格式不正确',
    ];

    /**
     * 字段描述
     */
    protected $field = [

    ];

    /**
     * 验证场景
     */
    protected $scene = [
        'service_details'  => ['id','content','art_id','images'],
    ];

}
